package mammuthus.web.action

import java.util
import javax.annotation.PostConstruct
import javax.servlet.http.HttpServletRequest
import com.alibaba.fastjson.JSON
import com.webdm.common.tools.CatchUtil
import mammuthus.web.bean.SlaveBean
import mammuthus.web.service.{SlaveService, SettingService}
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.{InitBinder, RequestMapping}

import scala.beans.BeanProperty
import scala.collection.JavaConversions._

/**
 * Created by fengbingjian on 15/5/3 11:53.
 */
@Controller
class SlaveAction() {


  @Autowired
  val slaveService:SlaveService = null





  @RequestMapping(Array("/slaveIndex.html"))
  def index(httpServletRequest: HttpServletRequest):String = {

    httpServletRequest.setAttribute("master", slaveService.getMaster)

    httpServletRequest.setAttribute("slave", slaveService.getSlave())
    "slaveIndex"
  }
}
